This invention relates to a data processor for executing a sequential in order a program which is held in, for example, an instruction memory, such as, a built-in program ROM, and more particularly to a low-power data processor which has a built-in battery and is suitable for use in, for example, various kinds of portable media terminals required to operate with low power consumption.
A portable terminal using technology for processing an analog signal is now commonly used in the form of, for example, a mobile telephone. When an expected increase in the number of users and an expected future request for a portable terminal capable of dialing with multimedia applications are taken into consideration, it is inevitable that such a portable terminal must necessarily handle a digital signal, and a portable terminal that can actually handle a digital signal has been already put into practical use. However, in the case of a terminal using a digital signal processor developed according to present prior art technology, its built-in battery cannot necessarily operate over a satisfactorily long time in view of the difficulty in reducing its power consumption.
As for the technique for extending the useful service life of the built-in battery of a terminal using a digital signal processor, it is a matter of first consideration to increase the capacity of the battery itself. On a other hand, the similar result can also be attained when the same processing can be executed by consumption of a lesser amount of power. Further, unlike the case of increasing the capacity of the battery, the latter case is advantageous in that there is no need for increasing the volume and weight of the terminal itself, and the amount of generated heat is rather decreased due to the reduced amount of power consumption, thereby improving the usability of the terminal.
For the purpose of decreasing the amount of power consumption required for such processing, an improvement in the processing algorithm is effective, and, when the same algorithm can be realized with consumption of a lesser amount of power during execution, such an improvement is also very effective. Digital data processing is carried out by a microprocessor designed for digital signal processing. Basically, the method of digital data processing includes reading out a pre-programmed program module from a memory, then decoding its instruction code, and finally executing the instruction. In the case of an ordinary general-purpose microprocessor, the system is such that a general-purpose external memory stores the program, and the instructions are successively read out to be fetched by the microprocessor. However, in the case of a microprocessor used for processing a digital signal, especially, in the case of a microprocessor incorporated in a portable terminal, it is a common practice to build the program memory in the microprocessor so as to reduce the overall volume of the hardware as much as possible. In a microprocessor of the type having a built-in program memory, a considerable proportion of the power is consumed during reading out of the program from the program memory, and the power consumption required for execution of the same program can be reduced when the number of program memory accesses during execution of the program can be decreased.
Various kinds of digital signal processing including speech signal processing in a mobile phone are featured in that repeat processing, which involves repeatedly executing a program module within a range of from several steps to several tens of steps at the most, is frequently carried out. The proportion of such processing in the overall processing is at least 20% and sometimes exceeds 50%. Generally, this repeat processing is realized by branching, a specified number of times, in the program to the head address of the program module to be repeatedly executed. However, execution of such a conditional branch instruction each time is wasteful. Thus, in the case of the prior art processor used for processing a digital signal, the manner of control now employed is such that an instruction specifying the number of instruction steps to be repeated and the number of times the module is to be repeated is provided ahead of the program module to be repeatedly executed, and, when the end of the program module is reached, the instruction returns automatically to the head address of the program module so as to cancel the overhead attributable to the execution of the branch instruction.
Anyway, however, the module of the same content was read out each time, and this resulted in the consumption of wasteful power.
The invention entitled "DATA PROCESSOR" described in JP-A-4-293124 employs a fundamental technique for saving the time required for reading out instructions, such as, a repeat module to be repeatedly accessed in each cycle from a program memory. According to the cited publication, in a data processor in which a memory storing a program is built in, one or more instruction registers are provided for storing an instruction module to be repeatedly executed, so that usually an instruction to be executed in each cycle is read out from the program memory (referred to hereinafter as an instruction memory) to be stored in a specific instruction register. However, when a repeat instruction for establishing an internal state required for repeated execution of the specific instruction is executed, the instruction read out from the instruction memory in the first loop is stored in the instruction registers whose number corresponds to the instruction module to be repeated and, in the second and succeeding loops, the specific instruction is not read out from the instruction memory, but the instruction code held in each of the instruction registers is directly read out so as to dispense with access to the instruction memory. The above manner of processing is advantageous in that the amount of power consumed for the memory access during execution of the corresponding part of the repeat module can be greatly decreased, so that the desired object of decreasing the power consumption can be attained.